{tpl head}
<script language="javascript">
    //获得选中文件的数据表
    function getCheckboxItem() {
        var myform = document.form1;
        var allSel = "";
        if (myform.bakfile.value)
            return myform.bakfile.value;
        for (i = 0; i < myform.bakfile.length; i++)
        {
            if (myform.bakfile[i].checked) {
                if (allSel == "")
                    allSel = myform.bakfile[i].value;
                else
                    allSel = allSel + "," + myform.bakfile[i].value;
            }
        }
        return allSel;
    }
    //反选
    function ReSel() {
        var myform = document.form1;
        for (i = 0; i < myform.bakfile.length; i++) {
            if (myform.bakfile[i].checked)
                myform.bakfile[i].checked = false;
            else
                myform.bakfile[i].checked = true;
        }
    }
    //全选
    function SelAll() {
        var myform = document.form1;
        for (i = 0; i < myform.bakfile.length; i++) {
            myform.bakfile[i].checked = true;
        }
    }
    //取消
    function NoneSel() {
        var myform = document.form1;
        for (i = 0; i < myform.bakfile.length; i++) {
            myform.bakfile[i].checked = false;
        }
    }
    //
    function checkSubmit()
    {
        var myform = document.form1;
        myform.bakfiles.value = getCheckboxItem();
        return true;
    }

</script>
<table width="99%" border="0" cellpadding="0" cellspacing="0" class="new_table">
    <thead>
    <tr class="n_bt"><td colspan="8" align="center">管理系统</td></tr>
    <tr><th class="thbt" colspan="8">【{$title}】 <a href="?c=backup">数据备份</a></th></tr>
    </thead>
    <form name="form1"  action="?c=backup&a=reduction_table" method="post" >
        <tr bgcolor="#F7F8ED">
            <td height="24" colspan="4" valign="top">
                <strong>发现的备份文件夹：</strong>
                <?php if(count($filelists)==0) echo " 没找到任何备份文件... "; ?>
            </td>
        </tr>
        <tr align='center' height='24' class="artlist">
            {loop $filelists $k $v}
            {if $k%2==0 and $k>1}</tr><tr class="artlist">{/if}
            <td align="center" width='10%'>
                <input name="folder" type="radio" value="{$v}" checked="checked" />
            </td>
            <td align="center" width='40%'>&nbsp; {$v}</td>
            {if count($filelists)%2!=0 and count($filelists)==($k+1)}<td></td><td></td>{/if}
            {/loop}
        </tr>
        <tr>
            <td height="24" colspan="4" valign="top">
                <strong>附加参数：</strong>当前PHP的版本的为: <?php echo PHP_VERSION;?>
            </td>
        </tr>

        <tr bgcolor="#E3F4BB"> <td></td>
            <td height="33" colspan="4">
                &nbsp;
                <input type="submit" name="Submit" class="button" value="请选择还原数据" class="coolbg np" />
            </td>
        </tr>
        <input type="hidden" name="a" value="redat2">
    </form>
</table>
{tpl foot}
